package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 管理员用户，用于登录PC管理客户端对象 com_user_admin
 *
 * @author ruoyi
 * @date 2021-04-25
 */
public class ComUserAdmin extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 管理员用户的ID，主键 */
    private Long id;

    /** 状态：0离线，1在线，-1停用 */
    @Excel(name = "状态：0离线，1在线，-1停用")
    private Long state;

    /** 账号名称，用于登录 */
    @Excel(name = "账号名称，用于登录")
    private String account;

    /** 密码 */
    @Excel(name = "密码")
    private String password;

    /** 密码重试次数，成功登陆后清零 */
    @Excel(name = "密码重试次数，成功登陆后清零")
    private Long passwordRetryNumber;

    /** 姓名 */
    @Excel(name = "姓名")
    private String name;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 角色的键值 */
    @Excel(name = "角色的键值")
    private Long roleId;

    /** 组织ID */
    @Excel(name = "组织ID")
    private Long organizationId;

    /** 子角色ID，0表示该组织的总管理员 */
    @Excel(name = "子角色ID，0表示该组织的总管理员")
    private Long subroleId;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;

    /** 最后登录的IP */
    @Excel(name = "最后登录的IP")
    private String lastLoginIp;

    /** 公众号ID */
    @Excel(name = "公众号ID")
    private Long wechatpublicId;

    /** 账号属于员工 */
    @Excel(name = "账号属于员工")
    private Long clientUserId;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setState(Long state)
    {
        this.state = state;
    }

    public Long getState()
    {
        return state;
    }
    public void setAccount(String account)
    {
        this.account = account;
    }

    public String getAccount()
    {
        return account;
    }
    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }
    public void setPasswordRetryNumber(Long passwordRetryNumber)
    {
        this.passwordRetryNumber = passwordRetryNumber;
    }

    public Long getPasswordRetryNumber()
    {
        return passwordRetryNumber;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }
    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getEmail()
    {
        return email;
    }
    public void setRoleId(Long roleId)
    {
        this.roleId = roleId;
    }

    public Long getRoleId()
    {
        return roleId;
    }
    public void setOrganizationId(Long organizationId)
    {
        this.organizationId = organizationId;
    }

    public Long getOrganizationId()
    {
        return organizationId;
    }
    public void setSubroleId(Long subroleId)
    {
        this.subroleId = subroleId;
    }

    public Long getSubroleId()
    {
        return subroleId;
    }
    public void setLastLoginTime(Date lastLoginTime)
    {
        this.lastLoginTime = lastLoginTime;
    }

    public Date getLastLoginTime()
    {
        return lastLoginTime;
    }
    public void setLastLoginIp(String lastLoginIp)
    {
        this.lastLoginIp = lastLoginIp;
    }

    public String getLastLoginIp()
    {
        return lastLoginIp;
    }
    public void setWechatpublicId(Long wechatpublicId)
    {
        this.wechatpublicId = wechatpublicId;
    }

    public Long getWechatpublicId()
    {
        return wechatpublicId;
    }
    public void setClientUserId(Long clientUserId)
    {
        this.clientUserId = clientUserId;
    }

    public Long getClientUserId()
    {
        return clientUserId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("state", getState())
                .append("account", getAccount())
                .append("password", getPassword())
                .append("passwordRetryNumber", getPasswordRetryNumber())
                .append("name", getName())
                .append("phone", getPhone())
                .append("email", getEmail())
                .append("roleId", getRoleId())
                .append("organizationId", getOrganizationId())
                .append("subroleId", getSubroleId())
                .append("lastLoginTime", getLastLoginTime())
                .append("lastLoginIp", getLastLoginIp())
                .append("remark", getRemark())
                .append("wechatpublicId", getWechatpublicId())
                .append("clientUserId", getClientUserId())
                .toString();
    }
}